#ifndef XISTREAM_H
#define XISTREAM_H

#include <iostream>

using std::cin;

#include "colored_stream.h"

// cin wrapper
class Xistream : public Colored_stream
{
    public:
        Xistream( color text = GREY, color background = BLACK )
            :Colored_stream( text, background )
        {}
        ~Xistream() {}

        template<typename T>
        Xistream& operator >> ( T& i ) {
            this->enable_color();
            cin >> i;
            this->disable_color();
            return *this;
        }
    protected:
    private:
};

#endif // XISTREAM_H
